import time

from unit01.Page.Page01 import Page
from unit01.Page.Page02 import Page02
import unittest
from ddt import ddt,file_data
from selenium import webdriver

@ddt()
class TestCase(unittest.TestCase):
    def setUp(self):
        self.driver=webdriver.Firefox()
        self.driver.maximize_window()
        self.driver.implicitly_wait(5)

    def tearDown(self):
        time.sleep(4)
        self.driver.quit()

    @file_data(r'C:\Users\Kaka\PycharmProjects\PythonProject39yuekao812\unit01\Tool\user.json')
    def test_baidu_01(self,info):
        po=Page(self.driver)
        po.baidu_ceshi_01(info)

    def test_baidu_02(self) :
        po=Page02(self.driver)
        po.baidu_ceshi_02()

if __name__ == '__main__':
    unittest.main()